/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Business;

import Entity.Etbl_Car_bookings;
import Model.DALtbl_Car_bookings;
import java.sql.Date;
import java.util.ArrayList;

/**
 *
 * @author Mr-aUgust
 */
public class Btbl_Car_bookings {
   private  DALtbl_Car_bookings _objDALtbl_Car_bookings=null;

    public Btbl_Car_bookings() {
        _objDALtbl_Car_bookings=new DALtbl_Car_bookings();
    }
    public boolean addtbl_Car_bookings(Etbl_Car_bookings objEtbl_Car_bookings){
        return _objDALtbl_Car_bookings.addtbl_Car_bookings(objEtbl_Car_bookings);
    }
    public boolean edittbl_Car_bookings(Etbl_Car_bookings objEtbl_Car_bookings){
        return _objDALtbl_Car_bookings.edittbl_Car_bookings(objEtbl_Car_bookings);
    }
    public boolean deletetbl_Car_bookings(int carbookings_Id){
        if(carbookings_Id>0)//carbookings_Id tu dong tang va bat dau tu 1
            return _objDALtbl_Car_bookings.deletetbl_Car_bookings(carbookings_Id);
        else
            return false;
    }
    public Etbl_Car_bookings getOne_Carbookings(int carbookings_Id){
        if(carbookings_Id>0)
            return _objDALtbl_Car_bookings.getOne_Carbooking(carbookings_Id);
        else
            return null;
    }
    public ArrayList<Etbl_Car_bookings> getList_Carbokings(String orderBy, String ASCorDESC, String WhereClause, int PagingIndex, int PagingSize){
        return _objDALtbl_Car_bookings.getListCarbookings(orderBy, ASCorDESC, WhereClause, PagingIndex, PagingSize);
    }
     public float CalRefund_Carbooking(int carbookingId, Date deteRefund){
         return _objDALtbl_Car_bookings.CalRefund_Carbooking(carbookingId, deteRefund);
     }
}
